package edu.psu.geovista.app.visualclassifier.classify.v2;

import edu.psu.geovista.classification.CategoryItf;
import edu.psu.geovista.classification.CategoryListItf;
import edu.psu.geovista.classification.ClassificationResultItf;
import edu.psu.geovista.classification.setting.ClassifySetting;
import edu.psu.geovista.legend.InteractiveLegend;
import edu.psu.geovista.ui.event.ClassificationResultListener;
import edu.psu.geovista.ui.event.ColorArrayListener;

import java.awt.*;
import java.util.Collection;
import java.util.Map;

/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * Licensed under Simplified BSD License
 *
 *
 * @Original Author: jin Chen
 * @date: Jan 3, 2005$
 * @version: 1.0
 */

public interface ESVisualClassifier {
     public void addColorArrayListener (ColorArrayListener l);
     public void removeColorArrayListener (ColorArrayListener l);
    public void addClassificationResultListener (ClassificationResultListener l);
    public void removeClassificationResultListener (ClassificationResultListener l) ;
     public void setDataModel(edu.psu.geovista.data.model.AppDataModel dataModel) ;
    public boolean hasData();
    public ClassificationResultItf getClassifyResult() ;
     //? do we need it
     public CategoryListItf getCtgList();
    public Color[] findDataColors();
    //do classification based on current settings
    public void classifyOnGUISetting();
    //do classification based on given settings
    public void classifyUpdateGUI(ClassifySetting settings);
    public void classifyOnVariableChanged(Object varname, boolean broadcast);
    public CategoryItf[] getCategories();
    //show the vc in a JFrame
    public void showup();
    //close the vc's JFrame
    public void close();
    public boolean isWorking();

    public void setWorking(boolean working) ;
    public  ClassificationResultItf getClassificationResultUnivar(Object varname);
     public void classify( ClassifySetting settings);
    public InteractiveLegend getLegendPlot();

     public Map<Object, ClassifySetting> getClassifySettings();

    /**
     *
     * @param classifySettings
     */
    public void setClassifySettings(Map<Object, ClassifySetting> classifySettings);
    public void doAllClassification(Collection<ClassifySetting> settings);
    public void broadcast();
}
